package org.lex.ftp.ui.queue.actions;

import java.awt.event.ActionEvent;

import org.lex.ftp.FTP;
import org.lex.ftp.queue.Task;
import org.lex.ftp.ui.queue.TaskEditorDialog;

public class EditAction extends AbstractQueueAction {
	public EditAction(FTP app) {
		super(app);
		this.setName("Edit");
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		Task task = this.getQueuePane().getSelectedTask();
		TaskEditorDialog dialog = new TaskEditorDialog(app.getRootWindow());
		dialog.setTask(task);
		dialog.setLocationRelativeTo(app.getRootWindow());
		dialog.setVisible(true);
	}
}
